package com.jier.vo;

import com.jier.entities.User;
import io.swagger.annotations.ApiModelProperty;

/**
 * 用户视图
 *
 * @author jie_r
 */
public class UserVo {

    @ApiModelProperty(value = "名称", dataType = "String")
    private String name;

    @ApiModelProperty(value = "年龄", dataType = "Integer")
    private Integer age;

    @ApiModelProperty(value = "性别", dataType = "Integer")
    private Integer sex;

    public UserVo(User user) {
        if(user != null) {
            this.name = user.getName();
            this.age = user.getAge();
            this.sex = user.getSex();
        }
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }
}
